package com.atlin.beaconsapiclientsdk.service;

import com.atlin.beaconsapiclientsdk.client.BeaconsApiClient;
import com.atlin.beaconsapiclientsdk.exception.BusinessException;
import com.atlin.beaconsapiclientsdk.model.request.BaseRequest;
import com.atlin.beaconsapiclientsdk.model.request.WeatherRequest;
import com.atlin.beaconsapiclientsdk.model.response.ResultResponse;

/**
 * @author atlin
 * @description
 * @createDate 2024/12/24 22:45
 */
public interface BeaconsApiService {

    <O, T extends ResultResponse> T request(BaseRequest<O, T> request) throws BusinessException;

    /**
     * 通用请求
     */
    <O, T extends ResultResponse> T request(BeaconsApiClient beaconsApiClient, BaseRequest<O, T> request) throws BusinessException;


    /**
     * 获取天气信息
     */
    ResultResponse getWeatherInfo(BeaconsApiClient beaconsApiClient, WeatherRequest request) throws BusinessException;

    /**
     * 获取天气信息
     */
    ResultResponse getWeatherInfo(WeatherRequest request) throws BusinessException;
}
